#include <bits/stdc++.h>

using namespace std;

class Solution
{
public:
    int foundOnceNumber(vector<int> &arr, int k)
    {
        unordered_map<int, int> m;
        for (auto e : arr)
        {
            m[e]++;
        }

        for (auto& k : m)
        {
            if (k.second == 1) 
            {
                return k.first;
            }
        }
        return 0;
    }
};